package gov.pbc.nn.kjgl.item.template;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.bstek.dorado.data.entity.EntityState;

import gov.pbc.nn.kjgl.item.template.entity.AcceptDept;
import gov.pbc.nn.kjgl.item.template.entity.ItemApproval;

public class ItemApprovalWarpper implements Serializable {

	private static final long serialVersionUID = 7617276223908617219L;

	private ItemApproval item;
	private List<AcceptDeptWarpper> depts = new ArrayList<AcceptDeptWarpper>();
	private EntityState state;

	public ItemApproval getItem() {
		return item;
	}

	public void setItem(ItemApproval item) {
		this.item = item;
	}

	public EntityState getState() {
		return state;
	}

	public void setState(EntityState state) {
		this.state = state;
	}

	public List<AcceptDeptWarpper> getDepts() {
		return depts;
	}

	public void addDept(AcceptDept dept, EntityState state) {
		AcceptDeptWarpper adw = new AcceptDeptWarpper(dept, state);
		this.depts.add(adw);
	}

	public static class AcceptDeptWarpper implements Serializable {
		private static final long serialVersionUID = 1013914093854809343L;
		private AcceptDept dept;
		private EntityState state;

		public AcceptDeptWarpper(AcceptDept dept, EntityState state) {
			this.dept = dept;
			this.state = state;
		}

		public AcceptDept getDept() {
			return dept;
		}

		public void setDept(AcceptDept dept) {
			this.dept = dept;
		}

		public EntityState getState() {
			return state;
		}

		public void setState(EntityState state) {
			this.state = state;
		}

	}
}
